//
//  Delay.swift
//  edu
//
//  Created by karlzhou on 15/11/4.
//  Copyright © 2015年 karlzhou. All rights reserved.
//

import Foundation

extension NSObject{
    public func delay(delay:Double,closure:() -> ()){
        dispatch_after(
            dispatch_time(
                DISPATCH_TIME_NOW,
                Int64(delay * Double(NSEC_PER_SEC))
            ), dispatch_get_main_queue(), closure)
    }
}